package mediator;

/**
 * @Author: Ma JiBin
 * @Email: 1423553596@qq.com
 * @Date: 2018/9/12 14:34
 * @Description: 中介者模式（Mediator Pattern）
 * ChatRoom 类为User类的中介者，显示User对象的消息
 */
public class Main {
    public static void main(String[] args) {
        User robert = new User("Robert");
        User john = new User("John");

        robert.sendMessage("Hi! John!");
        john.sendMessage("Hello! Robert!");
    }
}
